package com.sprint.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sprint.dao.BookDao;
import com.sprint.domain.Book;
import com.sprint.service.IBookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class IBookServiceImpl extends ServiceImpl<BookDao,Book> implements IBookService {

    @Autowired
    private BookDao bookDao;

    @Override
    public void save1() {
        System.out.println(" 2022 03 09   测试 ！！！！！");
    }

    @Override
    public IPage<Book> getPage2(Integer currPage, Integer pageSize) {
        IPage page = new Page(currPage,pageSize);
        bookDao.selectPage(page,null);
        return page;
    }

    @Override
    public IPage<Book> getPage2(Integer currPage, Integer pageSize, Book book) {
        IPage page = new Page(currPage,pageSize);
        bookDao.selectPage(page,null);
        return page;
    }

   /* @Override
    public IPage<Book>  getPage(Integer currentPage, Integer pageSize) {

        IPage page = new Page(currentPage,pageSize);
        bookDao.selectPage(page,null );
        return page;
    }*/


}
